package demo10;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/** 配置类
 * Spring提供了一个注解@Configuration
 * 被该注解标注的类表示它是一个Spring配置类
 * 我们可以在
 */
@Configuration
@ComponentScan("demo10")
public class Demo {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context
                = new AnnotationConfigApplicationContext(Demo.class);
        Person person = context.getBean(Person.class);
        System.out.println(person);



    }
}
